home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- Some notes on the XLISP EDITOR:
-
- I don't claim any copyright to the editor, and I actually
- welcome any alterations or additions you may want to make to it.
- In fact, to make things extra easy, I provide the following:
-
- This editor works on the basis that:
-
- (setq a 'b)
- <returns>
- b
-
- (setq b '(x y z))
- <returns>
- (x y z)
-
- So that:
- (eval a)
- <returns>
- (x y z)
-
- In the editor program, "curloc" is used where you see "a" above.
-
- To create your own functions you need only define your new
- function and then add its name to "comset" which contains the list
- of available commands. To rename the functions, you need only
- change the current function name to what you want, and change it's
- corresponding entry in "comset".
-
-
- On Using the Editor:
-
- Creating new functions:
- If you want to create a new function, you will have to create
- it outside the editor. A good way to start of a new function is
- to enter the following: (defun <fname> (<parameters>))
- For example, if I wanted to create a function that computed the
- factorial of a number, I would type in the following:
-
- (defun fact (x))
-
- followed by:
-
- (ef 'fact)
-
-
- Bugs:
- I have tested the editor on a variety of lisp functions and
- taken care of what errors appeared. Of course, I am sure that
- those of you out there who use my little creation with any
- regularity will certainly find a plethora of new ones. In my
- defense, I can only say this: Tell me what you find, and I'll
- incorporate the fix into a later version.
-
-
-
-
-
-
-
-
- - 1 -
-
-
-
- Insertion:
- You may have noticed that insertions may only be made after
- elements. This would seem to make it impossible to insert
- anything at the very beginning of a list... it doesn't. However,
- short of writing you own insertion function, you should try the
- following: "pre" some dummy atom to the first item of the list,
- then "rmp" the parentheses, then insert what you want, then delete
- the dummy atom. It's really not as involved as it sounds, and
- spares me the headache of trapping for all the special cases that
- would pop up otherwise.
-
- Moving:
- The variable "sxpr", which is used by the move function, is
- only altered when something is "Cut" to it by "mv c". This allows
- you to make multiple "Paste"s using "mv p", and even allows you to
- cut from one function definition and paste to another. To make
- this possible, one potential avenue for error was purposely left
- un-trapped. So please, don't try to paste anything until you have
- cut at least once. If you do, I guarantee the program will crash.
-
- Entering commands:
- Whether or not it is obvious, more than one command may be
- entered at the "Edit: >" prompt. For example, "d d a a d a a"
- will get you quickly into the heart of the function you're
- editing.
-
- Macros:
- While I didn't include any, you may want to add some macros.
- For instance, the command series "d d a a d a a" could be
- incorporated into a new function called "dth" for Descend To Heart
- of the function. Note that in my next revision I will have
- redesigned a number of the editor's functions so that creating
- macros will be easier.
-
- Things to stay away from:
- The following variables are destructively altered by the
- editor program: sf, base, curloc, comset, sxpr, tmp, tmp2; so don't
- use them in your own programs. Additionally, if you choose to use
- the save function provided, you should steer clear of the
- following variables: fp, bse, nmf, tpe, prms, rst.
-
-
- Things to look forward to in upcoming revisions:
-
- A viewing toggle that causes only a screen size portions of
- the list being edited to be displayed. (Useful for those BIG
- lists.)
- Tab stops in combination with an improved "pp" function that
- allows you to pretty-print a larger section of the list without
- having it scroll off the screen.
- An improved version of GOTO. I have tried a number of ways
- already, but so far it refuses to comply.
- An insert function that inserts in front of elements.
- Improved advance, backup, and descend functions, that let you
- move in leaps and bounds if you so desire.
- Revision of a number of functions to facilitate macro
- construction.
-
-
-
-
-
- - 2 -
-
-